  // BOOT.js is a utility to help/allow multiple javascript components
  // to start, stop and message each other in a nice way without fighting as much
  // or needing to be as conscious of each other.
  // It also helps load them after all html on the page is produced.
  // I use a script defer at bottom of page to invoke this or body on load
  // Script defer seems to produce slightly nicer results; seems to occur before display is up.
  var BOOT = {
    startup_handlers: new Array(),
    shutdown_handlers: new Array(),
    event_handlers: new Array(),
    register_startup_handler: function(handler) {
      BOOT.startup_handlers.push(handler);
    },
    register_shutdown_handler: function(handler) {
      BOOT.shutdown_handlers.push(handler);
    },
    shutdown: function() {
      for(var i=0;i<BOOT.shutdown_handlers.length;i++) {
        handler = BOOT.global_shutdown_handlers[i];
        handler.shutdown();
      }
    },
    startup: function() {
      for(var i=0;i<BOOT.startup_handlers.length;i++) {
        handler = BOOT.startup_handlers[i];
        handler.startup();
      }
    }
  }
